import React from 'react'
import "./newpeople.css"
export default function newpeople(props) {
    let { getnew,reqCartadd } = props
    return (
        <div className="newpeople">
            <h3>新人专享</h3>
            {
                getnew?getnew.map(item => (
                    <div className="clearfix" key={item.id}>
                        <img src={item.img} alt="" className="fl" />
                        <ul className="fl">
                            <li>{item.goodsname}</li>
                            <li>
                                <span>￥{item.price}</span>
                                <span>￥{item.market_price}</span>
                            </li>
                            <li><button onClick={()=>reqCartadd(item.id)}>加购</button></li>
                        </ul>
                    </div>
                )):null
            }

        </div>
    )
}
